package DMSXL._2023Before.ListNode_;

/*public class reverseList_ {
    public static void main(String[] args) {
        ListNode head = new ListNode();

    }
}
class Solution {
    public ListNode reverseList(ListNode head) {
        ListNode cur = new ListNode();
        cur.next = head;

        ListNode newhead = new ListNode();
        newhead.next = null;
        ListNode temp = null;
        while (cur.next != null){
            temp = cur.next;
            cur.next = cur.next.next;
            temp.next = newhead.next;
            newhead.next = temp;
        }


        return newhead;
    }
}*/